<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <meta content="always" name="referrer">
    <meta name="theme-color" content="#ffffff">
</head>

<body>

<div align="middle">


    <%-- 显示错误消息 --%>
    <% if (request.getAttribute("msg") != null) { %>
        <p style="color: red;"><%=request.getAttribute("msg")%></p>
    <% } %>
    <%-- 拦截器的提示消息 --%>
    <% if (session.getAttribute("msg") != null) { %>
        <p style="color: red;"><%= session.getAttribute("msg") %></p>
        <% session.removeAttribute("msg"); // 显示后清除消息 %>
    <% } %>


    <form action="/doLogin" method="post">

        <table align="center">
            <tr>
                <td>username:</td>
                <td><input type="text" id="username" name="username" value="admin"></td>
            </tr>

            <tr>
                <td>password:</td>
                <td><input type="password" id="password" name="password" value="112233"></td>
            </tr>

            <tr>
                <td colspan="2"><input type="submit" id="submit" name="submit"></td>
            </tr>
        </table>
    </form>
</div>


</body>


</html>